package hcn.protocol.brandnew.zhenliao.yaopin;

import com.fasterxml.jackson.annotation.JsonFormat;
import ctd.util.xml.jaxb.DateAdapter;
import ctd.util.xml.jaxb.DateTimeAdapter;
import lombok.Data;
import org.atag.sysrouter.annotation.DictionaryMapping;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import java.util.Date;


/**
 * 发药记录信息查询-响应消息（成功) - ODS_03120026_SUC
 *
 * @author enjoyLife
 */
@Data
@XmlRootElement(name = "Data")
@XmlAccessorType(XmlAccessType.FIELD)
public class DispensingRecordResponse {

    /**
     * 总条数
     */
    @XmlElement(name = "Total")
    private String total;
    /**
     * 记录
     */
    @XmlElement(name = "Records")
    private Records records;

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class Records {

        /**
         * 发药记录序号
         */
        @XmlElement(name = "DispensingRecordId")
        private String dispensingRecordId;
        /**
         * 发药日期时间
         */
        @XmlElement(name = "DispensingDateTime")
        @XmlJavaTypeAdapter(DateTimeAdapter.class)
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date dispensingDateTime;
        /**
         * 处方记录号
         */
        @XmlElement(name = "PrescriptionRecordId")
        private String prescriptionRecordId;
        /**
         * 处方类别代码
         */
        @XmlElement(name = "RecipeTypeCode")
        private String recipeTypeCode;
        /**
         * 处方开立日期
         */
        @XmlElement(name = "PrescriptionDate")
        @XmlJavaTypeAdapter(DateTimeAdapter.class)
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date prescriptionDate;
        /**
         * 患者姓名
         */
        @XmlElement(name = "Name")
        private String name;
        /**
         * 性别代码
         */
        @XmlElement(name = "Sex")
        private String sex;
        /**
         * 年龄（岁）
         */
        @XmlElement(name = "Age")
        private Short age;
        /**
         * 发票号码
         */
        @XmlElement(name = "InvoiceCode")
        private String invoiceCode;
        /**
         * 患者类型代码
         */
        @XmlElement(name = "PatientType")
        private String patientType;
        /**
         * 病人性质
         */
        @XmlElement(name = "PatientProperties")
        private String patientProperties;
        /**
         * 医院内患者唯一标识
         */
        @XmlElement(name = "SourcePatientId")
        private String sourcePatientId;
        /**
         * 出生日期
         */
        @XmlElement(name = "BirthDate")
        @XmlJavaTypeAdapter(DateAdapter.class)
        @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
        private Date birthDate;
        /**
         * 身份证件类别代码
         */
        @XmlElement(name = "IdCardCode")
        @DictionaryMapping(id = "CV02_01_101")
        private String idCardCode;
        /**
         * 身份证件号码
         */
        @XmlElement(name = "IdCard")
        private String idCard;
        /**
         * 就诊卡类别代码
         */
        @XmlElement(name = "MedicalCardType")
        private String medicalCardType;
        /**
         * 就诊卡号
         */
        @XmlElement(name = "MedicalCardId")
        private String medicalCardId;
        /**
         * 患者电话号码
         */
        @XmlElement(name = "ContactNo")
        private String contactNo;
        /**
         * 现住地址-门牌号码
         */
        @XmlElement(name = "LiveAddrHouseNumber")
        private String liveAddrHouseNumber;
        /**
         * 监护人身份证件号码
         */
        @XmlElement(name = "GuardianIdCardId")
        private String guardianIdCardId;
        /**
         * 监护人姓名
         */
        @XmlElement(name = "GuardianName")
        private String guardianName;
        /**
         * 监护人身份证件类别代码
         */
        @XmlElement(name = "GuardianIdCardType")
        private String guardianIdCardType;
        /**
         * 监护人电话号码
         */
        @XmlElement(name = "GuardianMobile")
        private String guardianMobile;
        /**
         * 就诊医疗机构组织机构代码
         */
        @XmlElement(name = "VisitOrganization")
        private String visitOrganization;
        /**
         * 就诊机构名称
         */
        @XmlElement(name = "VisitOrganizationName")
        private String visitOrganizationName;
        /**
         * 病人科室名称
         */
        @XmlElement(name = "DeptName")
        private String deptName;
        /**
         * 操作医生编码
         */
        @XmlElement(name = "DoctorId")
        private String doctorId;
        /**
         * 操作医生姓名
         */
        @XmlElement(name = "DoctorName")
        private String doctorName;
        /**
         * 病人科室代码(报告)
         */
        @XmlElement(name = "DeptCode")
        private String deptCode;
        /**
         * 药房编码
         */
        @XmlElement(name = "PharmacyCode")
        private String pharmacyCode;
        /**
         * 药房名称
         */
        @XmlElement(name = "PharmacyName")
        private String pharmacyName;
    }

}
